package io.coderyeah.ymcc.exception;

import io.coderyeah.ymcc.enums.YmccSystemError;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author lqs
 * @date 2022/10/19 11:03
 */
// 自定义业务异常
@EqualsAndHashCode(callSuper = true)
@Data
public class BusinessException extends RuntimeException {
    private String message;
    private String code;
    private YmccSystemError systemError;

    public BusinessException(YmccSystemError systemError) {
        this.systemError = systemError;
    }

    public BusinessException(String message, String code) {
        this.message = message;
        this.code = code;
    }

    public BusinessException(String message) {
        this.message = message;
    }
}
